#!/usr/bin/env node

// 引入readline模块
const readline = require('readline')

// 创建readline接口实例
const rl = readline.createInterface({
    input:process.stdin,
    output:process.stdout
})
rl.on('line', line => {
    const dataList=line.split('\t');
    let movieList=[];
    for (let i = 1; i < dataList.length; i++) {
        movieList.push(dataList[i].split(':')[0]);
    }
    let items=new Array(movieList.length);
    let n=0;
    for (const i of movieList){
        items[n++]=i;
    }
    for (let i = 0; i < items.length; i++) {
        for (let j = 0; j < items.length; j++) {
            console.log(`${items[i]}:${items[j]}\t1`)
        }
    }
})
rl.on("close", () => {
    process.exit(0)
})